class PSPawnEnemyBase extends PSPawn
	abstract;

// Ideally, this event would take place in the AI controller, so it could be defined in specific states.
// However, Bump (and Touch) only work if defined in Pawn-extended classes, so we hack it to perform properly.
/*event Bump(Actor Other, PrimitiveComponent OtherComp, Vector HitNormal)
{
	PSAIControllerEnemyLight(Controller).TouchedByPlayer(HitNormal);
}

// Turn on hit received, hearing or being touched
function Turn(Vector RotationDirection)
{
	local Rotator NewRotation;

	NewRotation = Rotator(RotationDirection);
	NewRotation.Pitch = 0;
	NewRotation.Roll = 0;
	SetDesiredRotation(newRotation);
	LockDesiredRotation(true, false);
}

event TakeDamage(int Damage, Controller InstigatedBy, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
	local PSAIControllerBase C;
	local Controller Killer;

	//super.TakeDamage(Damage, InstigatedBy, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);

	C = PSAIControllerBase(Controller);

	if( !C.TargetDetected ) 
	{
		Turn(HitLocation);
	}

	Health -= Damage;
	if (HitLocation == vect(0,0,0))
	{
		HitLocation = Location;
	}

	/*if ( Health <= 0 )
	{
		// Killed
		Killer = SetKillInstigator(InstigatedBy, DamageType);
		Died(Killer, damageType, HitLocation);
	}*/
}
	
DefaultProperties
{
}*/
